From: Carlos Garnacho Date: Thu, 26 Oct 2023 14:03:44 +0000 (+0200) Subject: misc: Fetch environment from launch context before spawn_async() X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~281^2~2^2~324 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=7b1223a2544f3da2bb147167aff9140b6f60ec97;p=gnome-shell.git misc: Fetch environment from launch context before spawn_async() This will fetch the right environment for the launched application, without using GNOME Shell's environment. Part-of: --- diff --git a/js/misc/util.js b/js/misc/util.js index 0201fd112..de5e6d861 100644 --- a/js/misc/util.js +++ b/js/misc/util.js @@ -120,8 +120,9 @@ export function spawnApp(argv) { export function trySpawn(argv) { let success_, pid; try { + const launchContext = global.create_app_launch_context(0, -1); [success_, pid] = GLib.spawn_async( - null, argv, null, + null, argv, launchContext.get_environment(), GLib.SpawnFlags.SEARCH_PATH | GLib.SpawnFlags.DO_NOT_REAP_CHILD, () => { try {